-- GENERATED SPELL FOR [Warsong Shaman] --


function spell0_27678(pUnit, Event) --@Chain Heal,Heal--
pUnit:FullCastSpellOnTarget(16367,pUnit)
pUnit:RegisterEvent('Sorts_27678', 2500, 1)
end

function spell1_27678(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(39945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27678', 3000, 1)
end

function spell2_27678(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(25025,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27678', 2350, 1)
end

function spell3_27678(pUnit, Event) --@Lesser Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(49309,pUnit)
pUnit:RegisterEvent('Sorts_27678', 1500, 1)
end

function spell4_27678(pUnit, Event) --@Magma Flow Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(33560,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_27678', 1, 1)
end

function spell5_27678(pUnit, Event) --@Water Shield,Self--
pUnit:FullCastSpellOnTarget(34827,pUnit)
pUnit:RegisterEvent('Sorts_27678', 620, 1)
end

function Sorts_27678(pUnit, Event)
local choix_sorts_27678 = math.random(0, 5)
if choix_sorts_27678 == 0 then
pUnit:RegisterEvent('spell0_27678', 1, 1)
end
if choix_sorts_27678 == 1 then
pUnit:RegisterEvent('spell1_27678', 1, 1)
end
if choix_sorts_27678 == 2 then
pUnit:RegisterEvent('spell2_27678', 1, 1)
end
if choix_sorts_27678 == 3 then
pUnit:RegisterEvent('spell3_27678', 1, 1)
end
if choix_sorts_27678 == 4 then
pUnit:RegisterEvent('spell4_27678', 1, 1)
end
if choix_sorts_27678 == 5 then
pUnit:RegisterEvent('spell5_27678', 1, 1)
end
end

function mob27678_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27678', math.random(1500, 3000), 1)
end

function mob27678_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27678_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27678_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27678, 1, 'mob27678_Action')
RegisterUnitEvent(27678, 2, 'mob27678_Leave')
RegisterUnitEvent(27678, 3, 'mob27678_Kill')
RegisterUnitEvent(27678, 4, 'mob27678_Die')
